package com.jake.spring.metadata.controller;

import com.jake.spring.metadata.config.DatabaseProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("db")
public class DatabaseController {

    @Autowired
    private DatabaseProperties databaseProperties;

    @GetMapping("server")
    public DatabaseProperties.Server getDatabase() {
        return databaseProperties.getServer();
    }

}
